package com;

import java.util.function.Predicate;

/**
 * 断言接口 用于判断
 */
public class PredicatOne {
    /**
     * 断言
     * @param name
     * @return
     */
    public static Boolean test(String name){
        Predicate<String> predicate = (x)->{
            if(x.equals("小明")){
                return true;
            }
            return false;
        };
        return predicate.test(name);


    }

    public static void main(String[] args) {
        String name = "小花";
        System.out.println(test(name));
    }

}
